<template>
  <a-result status="500" title="500" sub-title="Sorry, the server is reporting an error.">
    <template #extra>
      <a-button type="primary" @click="toHome">
        Back Home
      </a-button>
    </template>
  </a-result>
</template>

<script>
import { CURRENT_PATH, CURRENT_SELECT_APP, OPEN_MENU_KEY, SELECT_MENU } from '@/store/mutation-types'

export default {
    name: 'Exception500',
    methods: {
      toHome () {
        this.$store.commit(CURRENT_SELECT_APP, '')
        this.$store.commit(OPEN_MENU_KEY, '')
        this.$store.commit(SELECT_MENU, '')
        this.$store.commit(CURRENT_PATH, '')
        this.$router.push({ path: '/' })
      }
    }
  }
</script>
